Skip to content

feat(nifi): Add NiFi OPA Authorizer #1058

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

labrenbe
Copy link
Member

@labrenbe labrenbe commented Apr 15, 2025

Description

Builds Nifi OPA Plugin from source and makes it available to NiFi as NAR file.

Currently uses a specific commit and contains a workaround patch until this PR is merged and released.

Definition of Done Checklist

  • Not all of these items are applicable to all PRs, the author should update this template to only leave the boxes in that are relevant
  • Please make sure all these things are done and tick the boxes

Tasks

Preview Give feedback
TIP: Running integration tests with a new product image

The image can be built and uploaded to the kind cluster with the following commands:

bake --product <product> --image-version <stackable-image-version>
kind load docker-image <image-tagged-with-the-major-version> --name=<name-of-your-test-cluster>

See the output of bake to retrieve the image tag for <image-tagged-with-the-major-version>.

@labrenbe labrenbe self-assigned this Apr 15, 2025
@labrenbe labrenbe marked this pull request as ready for review April 15, 2025 08:54
@labrenbe labrenbe linked an issue Apr 22, 2025 that may be closed by this pull request
@maltesander maltesander self-requested a review April 22, 2025 14:56
@@ -127,7 +151,7 @@ ln -s /stackable/nifi-${PRODUCT} /stackable/nifi
chown --no-dereference ${STACKABLE_USER_UID}:0 /stackable/nifi
chmod --recursive g=u /stackable/python
chmod --recursive g=u /stackable/bin
chmod g=u /stackable/nifi-${PRODUCT}
chmod --recursive g=u /stackable/nifi-${PRODUCT}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This recursive chmod will bloat the image. If you only want the extensions/opa-authorizer.nar chmodded please do that in the builder step.

REPOSITORY                        TAG                              IMAGE ID       CREATED         SIZE
oci.stackable.tech/sdp/nifi       1.28.1-stackable0.0.0-dev-opa    4647bd8fb197   7 seconds ago   5.65GB
oci.stackable.tech/sdp/nifi       1.28.1-stackable0.0.0-dev        2d7de1b048a7   38 hours ago    3.12GB

Comment on lines +93 to +97
# TODO: Set to tag after new release of nifi-opa-plugin
RUN git clone --depth 1 https://github.com/DavidGitter/nifi-opa-plugin.git && \
cd nifi-opa-plugin && \
git reset --hard cdf8c36 && \
git apply /stackable/nifi-framework-api-version.patch && \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably want profiles upstream for that.

FROM stackable/image/java-devel AS opa-authorizer-builder

ARG STACKABLE_USER_UID
ARG PRODUCT
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PRODUCT is not used in this builder.

Suggested change
ARG PRODUCT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a NiFi Authorizer that interfaces with OPA
2 participants